package com.xbongbong.pay.platform.unionpay.enums;

import lombok.Getter;

/**
 * 银联接口 url
 * @author 魏荣杰
 * @date 2021/1/19 16:22
 * @since
 * @version
 */
@Getter
public enum UnionPayUrlEnum {
    /**
     * 消费接口
     */
    FRONT_TRANS("/frontTransReq.do"),
    /**
     * 消费撤销接口  退货接口
     */
    BACK_TRANS("/backTransReq.do")
    ;
    private final String pattern;

    UnionPayUrlEnum(String pattern) {
        this.pattern = pattern;
    }

    public static String getUrl(UnionPayServerEnum unionPayServerEnum, UnionPayUrlEnum unionPayUrlEnum) {
        return unionPayServerEnum.getDomain() + unionPayUrlEnum.getPattern();
    }
}
